/* Par défaut : BD Cartoon Shout */
body {
  font-family: "BD Cartoon Shout", sans-serif;
}

/* Titres */

body, h1, h2, p, a, .gallery, .aunis-title {
  font-family: "BD Cartoon Shout", sans-serif;
}


.h1 {
  width: 500px;
  margin: 0 auto 1em;
  padding: 0.5em;
  text-align: center;
  border-bottom: medium solid #fff;
  font-size: 8px;
  background-color: var(--color-1);
  opacity: 0.93;
}

h2 {
  margin: 0 0 1em;
  padding: 0.5em;
  text-align: center;
  font-size: 10px;
	margin-bottom: 0;
}

h3 {
  font-family: Fredoka One, serif !important;
  font-size: 14px;
  line-height: 1.6;
  color: white;
  font-weight: normal;
}

/* Police perso */
@font-face {
  font-family: "BD Cartoon Shout";
  src: url("BD_Cartoon_Shout.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

/* Variables globales */
:root {
  --color-1: #214e74;
}

/*  Base */
html, body {
  height: 100%;
  font-family: "BD Cartoon Shout", Serif;
  color: #FFF;
  font-weight: 600;
  background-image: url("Fond Craft.png");
  background-repeat: repeat;        /* répète le motif */
  background-size: auto;            /* conserve la taille originale */
  background-position: top left;    /* position de départ */
  background-attachment: fixed;     /* empêche le décalage lors du scroll */
  padding: 2em;
  margin: 0;
}

/*  Images génériques */
.img {
  width: 150px;
  height: 150px;
}

/* Portrait Logo - Responsive */
.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0;
  padding: 0;
  max-width: 100%;
  width: auto;
}

.logo-container img {
  max-width: 100%;
  height: auto;
}

.portrait-logo {
  max-width: 10px; /* Ajuste selon ta préférence */
  height: auto;
  margin-bottom: 0; /* Évite l’espace sous l’image */
  padding: 0;
  display: block;
}

.portrait-text {
  max-width: 600px;
  margin: 2em auto;
  font-family: Fredoka One, sans-serif;
  font-weight: normal;
  line-height: 1.5;
  color: #fff;
}

.portrait-text .portrait-img {
  float: left;
  width: 180px;      /* taille du portrait */
  height: 180px;
  margin: 0 1em 1em 0;
  border-radius: 50%;  /* cercle */
  shape-outside: circle(); /* texte épouse le cercle */
  -webkit-shape-outside: circle(); /* Safari/Chrome */
  clip-path: circle(); /* masque image en cercle */
  object-fit: cover;   /* image bien centrée */
}

.portrait-img {
  float: left;
  width: 180px;
  height: auto;
  margin: 0 20px 20px 0;
  border-radius: 8px;
}


.icon-menu {
  width: 100%;
  max-width: 600px; /* Largeur max sur les grands écrans */
  background-image: url("../../Divers/Portrait Logo 2.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;

  display: flex;
  justify-content: center;
  align-items: center;

  gap: 2px;

  font-weight: 600;

  margin: 0 auto; /* Centré horizontalement */
  padding: 0;
}

.icon-menu img:hover {
  transform: scale(1.3);
  z-index: 10;
}

@media (max-width: 600px) {
  .portrait-logo {
    max-width: 90%;
    margin-top: 3em;
  }
}


/* Grille responsive */
#grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  grid-auto-rows: 80px;
  gap: 5px;
  width: 70%;
  max-width: 500px;
  margin: 10px auto 1em;
  background-color: var(--color-1);
  opacity: 0.93;
}

/* Hover */
#grid img:hover {
  transform: scale(1.3);
  transition: transform 0.3s;
  z-index: 1;
}

/* Grid 2 */
#grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  grid-auto-rows: 80px;
  gap: 5px;
  width: 70%;
  max-width: 500px;
  margin: 10px auto 1em;
  background-color: var(--color-1);
  opacity: 0.93;
}



#grid2 > div {
  display: flex;
  align-items: center;   /* centre verticalement */
  justify-content: center; /* centre horizontalement */
}

#grid2 img {
  
  margin: center;     /* centrage automatique */
  display: block;   /* évite les espaces inline */
}

/* Hover */
#grid img:hover,
#grid2 img:hover {
  transform: scale(1.3);
  transition: transform 0.3s;
  z-index: 1;
}





.gallery {
  width: 95%;
  max-width: 500px;
  margin: 0 auto;
  column-count: 2;           /* 2 colonnes pour desktop */
  column-gap: 0.5em;         /* espace horizontal entre colonnes */
  background-color: var(--color-1);
  opacity: 0.83;
  padding: 0.5em;
  box-sizing: border-box;
}

.gallery img {
  width: 100%;               /* occupe toute la largeur de la colonne */
  height: auto;              /* garde le ratio original */
  display: block;
  margin-bottom: 0.5em;      /* espace vertical */
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3); /* optionnel : pour détacher les images */
  break-inside: avoid;       /* évite que les images se coupent entre colonnes */
}

/* Responsive téléphone : forcer 2 images par ligne */
@media (max-width: 600px) {
  .gallery {
    column-count: initial;             /* désactive le mode colonnes */
    display: grid;
    grid-template-columns: repeat(2, 1fr);  /* 2 images sur la largeur */
    gap: 0.5em;                         /* espace entre les images */
    margin-top: 4em;                    /* espace supplémentaire au-dessus */
  }

/* Portrait + Galerie élargis en responsive */
@media (max-width: 600px) {
  .portrait-logo {
    max-width: 100%;       /* prend toute la largeur */
    padding: 0 0.5em;      /* petite marge gauche/droite */
  }	
	
   .gallery {
    width: 100%;           /* pleine largeur */
    max-width: none;       /* supprime la limite fixe */
    margin-top: 3em;       /* espace au-dessus */
    padding: 0 0.5em;      /* marge intérieure pour éviter collage aux bords */
    grid-template-columns: repeat(2, 1fr); /* garde 2 images par ligne */
  }
}



  display: flex; /* Utiliser flex pour centrer le contenu */
  
}

/* Modification de l'image pour qu'elle s'adapte à la lightbox */
#lightbox img {
  max-width: 90%; /* Limite la taille de l'image à 90% de la largeur de la lightbox */
  max-height: 90%; /* Limite la taille de l'image à 90% de la hauteur de la lightbox */
  object-fit: contain; /* Pour éviter que l'image soit déformée */
  border-radius: 10px; /* Ajouter des coins arrondis si vous le souhaitez */
}


/* Style général du lightbox */
#lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: var(--color-1);
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#lightbox .close {
  position: absolute;
  top: 20px;    /* Positionné à 20px du haut */
  right: 20px;  /* Positionné à 20px de la droite */
  background-color: none; /* Temporairement rouge pour tester */
  border: 2px solid white;
  border-radius: 50%; /* Cercle */
  width: 45px;  /* Taille du cercle */
  height: 45px; /* Taille du cercle */
  display: flex;
  align-items: center; /* Centré verticalement */
  justify-content: center; /* Centré horizontalement */
  font-size: 20px; /* Taille de la croix */
  color: white; /* Couleur de la croix */
  cursor: pointer;
  z-index: 1000; /* Assure que la croix reste au-dessus de l'image */
  transition: 0.2s ease;
}

/* Style des boutons (précédent, suivant, fermer) */
.close, .prev, .next {
  position: absolute;
  background: rgba(0,0,0,0.5); /* Fond noir semi-transparent */
  border: 2px solid #fff; /* Bordure blanche */
  border-radius: 50%; /* Cercle */
  width: 45px; /* Taille du cercle */
  height: 45px; /* Taille du cercle */

  display: flex;
  align-items: center;
  justify-content: center;
  
  font-size: 30px; /* Taille de la croix */
  color: white; /* Couleur des icônes */
  cursor: pointer;
  z-index: 1000;
  transition: 0.2s ease;
}

.close::before {
  content: "x"; /* Symbole de la croix */
  font-size: 30px; /* Taille de la croix */
  color: white; /* Couleur de la croix */

}

/* Effet au survol */
.close:hover, .prev:hover, .next:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #ddd;
  color: #ddd;
}

/* Positions spécifiques */
.close { top: 20px; right: 35px; }
.prev { left: 5%; top: 50%; transform: translateY(-50%); }
.next { right: 5%; top: 50%; transform: translateY(-50%); }

/* ?? Responsive sur PC */
@media (min-width: 1024px) {
  #lightbox .close,
  #lightbox .prev,
  #lightbox .next {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
}
	







